import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserEntity } from '../user/entities/user.entity';
import { PassportModule } from '@nestjs/passport';
import { UserService } from '../user/user.service';
import { LocalStrategy } from './local.stragegy';
import { JwtModule } from '@nestjs/jwt';
import { UserLikeEntity } from 'src/user-like/entities/user-like.entity';
import { UserFavoriteEntity } from 'src/user-favorite/entities/user-favorite.entity';
const jwtKey = {
  secret: 'jwt-key',
};

@Module({
  imports: [
    JwtModule.register({
      ...jwtKey,
      signOptions: {
        expiresIn: '24h',
      },
    }),

    TypeOrmModule.forFeature([UserEntity, UserLikeEntity,       
      UserFavoriteEntity,  ]),
    PassportModule,
  ],
  providers: [AuthService, UserService, LocalStrategy],
  controllers: [AuthController],
})
export class AuthModule {}
